2feb0ceb25b671ba31e46cdd25e45212a996b4f8,omod/src/main/java/org/openmrs/module/webservices/rest/search/CashPointSearchHandler.java,CashPointSearchHandler,search,#RequestContext#,38
Before Change
if (location_uuid == null) {
// Do a name search
PagingInfo pagingInfo = PagingUtil.getPagingInfoFromContext(context);
List<CashPoint> cashpoints = service.findByName(query, context.getIncludeAll(), pagingInfo);
AlreadyPagedWithLength<CashPoint> results = new AlreadyPagedWithLength<CashPoint>(context, cashpoints, pagingInfo.hasMoreResults(), pagingInfo.getTotalRecordCount());
return results;
} else {
After Change
if (location_uuid == null) {
// Do a name search
cashpoints = service.findByName(query, context.getIncludeAll(), pagingInfo);
} else if (query == null) {
//performs the location search
cashpoints = service.getCashPointsByLocation(location, context.getIncludeAll(), pagingInfo);